package com.loanapp.server.market.api.home.api;

import com.loanapp.server.market.api.home.hystrix.MainIndexApiFallbackFactory;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;
import java.util.Map;

/**
 * Desc: 水珠钱包首页接口
 * Author: dushuang
 * Date: Create in 2017/8/24
 */

@FeignClient(value = "loanapp-server-market-provider",path = MainIndexApi.mapping,fallbackFactory = MainIndexApiFallbackFactory.class)
public interface MainIndexApi {

    static String mapping="mainIndex";

    /**
     * 首页bannar
     *
     * @param channelId
     * @return
     */
    @PostMapping("getBannar")
    List<Map<String, Object>> getBannar(String channelId);

    /***
     * 明星产品
     * @param productType   产品类别（1.明星产品，2.广告产品）
     * @return
     */
    @PostMapping("getStarProduct")
    List<Map<String, Object>> getStarProduct(String productType);

    /***
     * 跑马灯
     * 轮播用户借款成功记录
     * @return
     */
    @PostMapping("getBorrowRecord")
    List<Map<String, Object>> getBorrowRecord();

    /***
     * 咨讯精选
     * @param cmsChannel
     * @return
     */
    @PostMapping("getIndexNews")
    List<Map<String, Object>> getIndexNews(String cmsChannel);

    /***
     * 活动列表
     * @param cmsChannel
     * @return
     */
    @PostMapping("getActivity")
    List<Map<String, Object>> getActivity(String cmsChannel);

    /***
     * 查询cms详情
     * @param cmsId
     * @return
     */
    @PostMapping("getCmsDesc")
    Map<String, Object> getCmsDesc(String cmsId);

    /***
     * 检查APP更新
     * @param versionId
     * @param storeNameChannel
     * @return
     */
    @PostMapping("findAppDetail")
    Map<String, Object> findAppDetail(String versionId, String storeNameChannel);

    /**
     * 帮助中心
     *
     * @param channelId
     * @return
     */
    @PostMapping("getHelpCenter")
    List<Map<String, Object>> getHelpCenter(String channelId);
}
